package data.entity;

import java.io.Serializable;

public class SpotEntity implements Serializable  {
	/** ����ID */
	private int spotID;
	/** ������� */
	private String spotName;
	/** �������� */
	private int cityId;
	/** ������� */
	private String spotIntro;
	/** ��������� */
	private String preference;

	public SpotEntity(int spotID, String spotName, int cityId,
			String spotIntro,String preference) {
		super();
		this.spotID = spotID;
		this.spotName = spotName;
		this.cityId = cityId;
		this.spotIntro = spotIntro;
		this.preference=preference;
	}
	
	public SpotEntity(String spotName, int cityId,
			String spotIntro,String preference) {
		super();
		this.spotName = spotName;
		this.cityId = cityId;
		this.spotIntro = spotIntro;
		this.preference=preference;
	}

	public int getSpotID() {
		return spotID;
	}

	public void setSpotID(int spotID) {
		this.spotID = spotID;
	}

	public String getSpotName() {
		return spotName;
	}

	public void setSpotName(String spotName) {
		this.spotName = spotName;
	}

	public int getPreCity() {
		return cityId;
	}

	public void setPreCity(int cityId) {
		this.cityId = cityId;
	}

	public String getSpotIntro() {
		return spotIntro;
	}

	public void setSpotIntro(String spotIntro) {
		this.spotIntro = spotIntro;
	}

	public String getPreference() {
		return preference;
	}

	public void setPreference(String preference) {
		this.preference = preference;
	}

	public boolean equals(Object obj) {
		if (obj == null) {
			return false;
		} else {
			if (obj instanceof SpotEntity) {
				SpotEntity se = (SpotEntity) obj;
				if (this.spotID == se.spotID
						&& this.spotName.equals(se.spotName)
						&& this.spotIntro.equals(se.spotIntro)
						&& this.cityId==se.cityId
						&& this.preference.equals(se.preference)) {
					return true;
				} else
					return false;
			} else
				return false;
		}

	}
}
